package network.protocol;

import lombok.Getter;
import lombok.Setter;

import java.util.Map;

@Getter
@Setter

public class Request {

    // 业务操作标识，比如 "course.findByTeacher"
    private String action;

    // 携带的参数（key-value 对形式）
    private Map<String, Object> params;

    //添加RequestId，表明是哪一个请求
    private String requestId;

    // 无参构造器，反序列化时需要
    public Request() {}

    public Request(String action, Map<String, Object> params,String requestId) {
        this.action = action;
        this.params = params;
        this.requestId=requestId;
    }
}
